package com.oig.oauth.api.fallback;

import com.oig.common.module.SysResponse;
import com.oig.oauth.api.OauthService;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.MultiValueMap;

import java.util.Map;

@Slf4j
public class OauthServiceFallbackImpl implements OauthService {

    @Setter
    private Throwable cause;


    @Override
    public Map<String,Object> token(MultiValueMap<String, Object> parameters) {
        log.debug("oauth token error: param={}, exception:{}",parameters, cause);

        log.debug("msg={}",cause.getMessage());


        return null;
    }




    @Override
    public SysResponse<String> logout(String accessToken) {
        log.error(accessToken+"退出异常", cause);
        return null;
    }
}
